import java.util.Arrays;

public class test {

    public static void transform1(int[] arr) {
        for (int i = 0; i < arr.length; i++) {

            arr[i] = arr[i] * 2;

        }

    }

    public static int[] transform2(int[] arr) {
        int[] temp = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            temp[i] = arr[i] * 2;
        }
        return temp;
    }

    public static void change(int[] arr) {
        int i = 0;
        int j = arr.length - 1;
        while (i < j) {
            while (i < j && arr[i] % 2 != 0) {
                i++;
            }
            while (i < j && arr[ j    ] % 2 == 0) {
                j--;
            }
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
    }
    public static int[] sum(int[]arr,int target){
        int[]ret=new int[]{-1,-1};
        for(int i=0;i< arr.length;i++){
            for(int j=arr.length-1;j>i;j--){
                if (target==arr[i]+arr[j]){
                    ret[0]=i;
                    ret[1]=j;
                }
            }
        }
        return ret;
    }
public static int found(int[]arr){
        int sum=0;

        for(int i=0; i<arr.length;i++){
        sum^=arr[i];
        }
return sum;

}
    public static void main1 (String[] args){
      int[]arr={1,2,3};
     int[]ret= transform2(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(ret));
    }
public static int find(int[]arr){
        Arrays.sort(arr);
        return arr[arr.length/2];
}
    public static void main(String[] args){
        int[]arr={3,3,3,9,9};

        int a=find(arr);
       // System.out.println(Arrays.toString(ret));
        System.out.println(a);
    }
}